package com.tpyule.tpclass.service.impl;

import com.tpyule.tpclass.dao.ADDao;
import com.tpyule.tpclass.entity.pojo.AD;
import com.tpyule.tpclass.service.ADService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zzz
 * @version 1.0
 * @date 2020/5/24 14:25
 */
@Service
public class ADServiceImpl implements ADService {
    @Autowired
    ADDao adDao;
    @Override
    public int addAD(AD ad) {
        return adDao.addAD(ad);
    }

    @Override
    public int updateAD(AD ad) {
        return adDao.updateAD(ad);
    }

    @Override
    public int deleteAD(AD ad) {
        return adDao.deleteAD(ad);
    }

    @Override
    public AD getAD(int id) {
        return adDao.getAD(id);
    }

    @Override
    public List<AD> getListAD() {
        List<AD> ads= adDao.getListAD();
        return ads;
    }
}
